package com.csdj.t309springboot.kaoshi.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * web相关的配置类
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    private Logger log = LoggerFactory.getLogger("test");


    /**
     * 跳转视图页面
     * @param registry 视图控制器注册表
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //跳转到/login.html页面
        registry.addViewController("/login");//跳转到/login.html页面
        registry.addViewController("/chaxun");
        registry.addViewController("/lief");
        registry.addViewController("/top");
        registry.addViewController("/add");

    }
}
